#ifndef SEARCHWIDGET_H
#define SEARCHWIDGET_H

#include <QWidget>
#include<QListWidgetItem>
#include<QJsonParseError>
#include<QJsonArray>
#include<QStyleOption>
#include<QPainter>
#include"global.h"
#include"SongMgr.h"
#include"songitem.h"
namespace Ui {
class SearchWidget;
}

class SearchWidget : public QWidget
{
    Q_OBJECT

public:
    explicit SearchWidget(QWidget *parent = nullptr);
    ~SearchWidget();

private:
    void initHttpHandlers();
private:
    Ui::SearchWidget *ui;

public:
    QList<songInfo>songList;       //内部维护一个QList存储搜索出来的歌曲列表
    void updataListWidget();
    void deleteItem();
    QLabel* getSongLab();
    QList<songInfo>getSongList();

signals:
    void listDoublePress(int index);


private slots:
    void on_listWidget_itemDoubleClicked(QListWidgetItem *item);
    void slot_search_mod_finish(ReqId id,QString res,ErrorCodes err);
};

#endif // SEARCHWIDGET_H
